<%@page import="java.util.Set"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="js/jquery-1.11.0.js"></script>
<script type="text/javascript">
	$(function(){
		$("select").change(function(){
			change();
		});
		function change(){
			$("#prievew").attr("src",$("select").val());
		}
		
		change();
	});
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加商品</title>
</head>
<body>
	<div id="add_good"></div>
	<form  method="post" action="UpdateGood">
		<input type="hidden" name="type" value="1">
		商品介绍<input name="name" type="text"><br>
		商品价格<input name="price"  type="text"><br>
		商品数量<input name="number"  type="text"><br>
		商品图片
		<select name="imgeurl">
			<%
				Set<String> set = application.getResourcePaths("/images");
				for(String str:set){
				str = str.replaceFirst("/", "");
			%>
				<option value="<%=str%>"><%=str %></option>
			<%	
				}
			%>
		</select>
		<img id="prievew" style="width: 100px ;height: 100px">
		<br>
		<input id="good_add_btn" type="button" value="添加">
	</form>
</body>
</html>